﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class MasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["user"] != null)
        {
            lb_User.Text = Session["user"].ToString();
            lb_log.Text = "LogOut";
            lb_log.NavigateUrl = "~/LogOut.aspx";
        }
        else
        {
            lb_User.Text = "Guest";
            lb_log.Text = "LogIn";
            lb_log.NavigateUrl = "~/LogIn.aspx";
        }
    }
    protected void lbt_English_Click(object sender, EventArgs e)
    {
        Response.Cookies["culture"].Value = "en-US";
        Response.Redirect(Request.Url.ToString());
    }
    protected void lbt_Vietnamese_Click(object sender, EventArgs e)
    {

        Response.Cookies["culture"].Value = "vi-VN";
        Response.Redirect(Request.Url.ToString());
    }
    protected void lbt_Theme1_Click(object sender, EventArgs e)
    {
        Response.Cookies["theme"].Value = "Theme1";
        
        Response.Redirect(Request.Url.ToString());
    }
    protected void lbt_Theme2_Click(object sender, EventArgs e)
    {
        Response.Cookies["theme"].Value = "Theme2";
        Response.Redirect(Request.Url.ToString());
    }
}
